package e

const (
	COUPON_TYPE_ERROR        = 0
	COUPON_TYPE_CASH         = 1
	COUPON_TYPE_DISCOUNT     = 2
	COUPON_TYPE_SPEND_ENOUGH = 3
)

var MsgCouponTypes = map[int64]string{
	COUPON_TYPE_ERROR:        "没有此类型的优惠券",
	COUPON_TYPE_CASH:         "现金券",
	COUPON_TYPE_DISCOUNT:     "折扣券",
	COUPON_TYPE_SPEND_ENOUGH: "满减券",
}

// GetMsg get error information based on Code
func GetMsgCouponType(code int64) string {
	msg, ok := MsgCouponTypes[code]
	if ok {
		return msg
	}

	return MsgCouponTypes[COUPON_TYPE_ERROR]
}
